import request from '@/utils/request'

export function fetchAgentList(data) { // 坐席列表接口
  return request({
    url: '/agent/list',
    method: 'post',
    data
  })
}

export function fetchDetail(data) { // 坐席详情接口
  return request({
    url: '/agent/get',
    method: 'get',
    params: data
  })
}

export function fetchCreate(data) { // 坐席新增接口
  return request({
    url: '/agent/create',
    method: 'post',
     data
  })
}
export function fetchEdit(data) { // 坐席编辑接口
  return request({
    url: '/agent/update',
    method: 'post',
     data
  })
}

export function fetchDel(data) { // 坐席编辑接口
  return request({
    url: '/agent/del',
    method: 'get',
    params: data
  })
}

export function reloadagent(data) { // 坐席编辑接口
  return request({
    url: '/agent/reset',
    method: 'post',
    data
  })
}
export function fetchMonitor(data) { // 坐席编辑接口
  return request({
    url: '/agent/monitor/list',
    method: 'post',
    data
  })
}

export function fetchExport(data) { // 坐席编辑接口
  return request({
    url: '/agent/monitor/export',
    method: 'post',
    data
  })
}

export function fetchMonitorExport(data) { // 坐席编辑接口
  return request({
    url: '/agent/monitor/export',
    method: 'post',
    responseType: "blob",
    data
  })
}

export function fetchMonitorSum(data) { // 坐席编辑接口
  return request({
    url: '/agent/monitor/all',
    method: 'post',
    data
  })
}
